@isTest(SeeAllData=true)
public class TestUpdateCatalogFieldOnOpptyTrigger{
    private static testMethod void testInsert(){
        Test.startTest();
        Campus__c cmps = new Campus__c(Name = 'Unit Test', Active__c = True);
        cmps.recordTypeId = Schema.sObjectType.Campus__c.getRecordTypeInfosByName().get('West - Campus').getRecordTypeId();
        insert cmps;
        
        Program__c prgm = new Program__c(Name = 'Unit Test', Active__c = True);
        prgm.recordTypeId = Schema.sObjectType.Program__c.getRecordTypeInfosByName().get('West - Program').getRecordTypeId();
        insert prgm;
        
        Catalog__c ctlg = new Catalog__c(Catalog_Name__c = 'Unit Test', Active__c = True, Campus__c = cmps.Id, Program__c = prgm.Id);
        ctlg.X3_Payments__c = true;
        ctlg.recordTypeId = Schema.sObjectType.Catalog__c.getRecordTypeInfosByName().get('West').getRecordTypeId();
        insert ctlg;
        
        Account acc = new Account();
        acc.LastName = 'Test';
        acc.FirstName = 'Unit';
        acc.Account_Assigned_Date__c = Date.valueOf('2012-02-27');
        acc.Age_Rage__pc = '24 to 39';
        acc.Birth_Date__c = Date.valueOf('1982-01-03');
        acc.Delegation_or_Municipality__c = 'Benito Juarez';
        acc.Do_Not_Text_Message__pc = false;
        acc.Exterior_Number__c = '10';
        acc.Extra_curricular_activities__c  = 'Soccer';
        acc.Father_s_Email__c = 'jose@father.com';
        acc.Father_s_First_Name__c = 'Jose';
        acc.Father_s_Last_Name__c = 'Gonzalez';
        acc.Gender__pc = 'Male';
        acc.Other_City__c = 'México DF';
        acc.Other_Postal_Code__c = '03100';
        acc.Other_Street__c = 'Porfirio Díaz';
        acc.Personal_Email__pc   = 'pablo@prueba.com';
        acc.PersonEmail = 'pablo@prueba.com';
        acc.PersonMobilePhone = '5598741230';
        acc.Phone = '5598741230';
        acc.Preferred_Email__pc  = 'Personal Email';
        acc.Preferred_Phone__pc = 'Mobile Phone';
        acc.RecordTypeId = Schema.sObjectType.Account.getRecordTypeInfosByName().get('West - Student Account').getRecordTypeId();
        acc.Status__c = 'Prospect';
        insert acc;
        
        Opportunity oppty = new Opportunity();
        oppty.Name= 'Unit Test';
        oppty.AccountId = acc.Id;
        oppty.RecordTypeId = Schema.sObjectType.Opportunity.getRecordTypeInfosByName().get('BPP - Student Application').getRecordTypeId();
        oppty.Registrant_Type__c = 'High School - Local';
        oppty.StageName = 'Application Started';
        oppty.Campus__c = cmps.Id;
        oppty.Program__c = prgm.Id;
        oppty.Catalog__c = ctlg.Id;
        oppty.Payment_plan__c = '3';
        oppty.CloseDate = Date.valueOf('2012-04-01');
        insert oppty;
        //oppty.Account = 'Unit';
        /*ld.Phone = '1234567890';
        ld.Email = 'unit@test.method';
        ld.Home_Phone__c = '1234567890';
        //ld.Program_Text__c = 'Unit Test';
        //ld.Campus_Text__c = 'Unit Test';
        ld.Campus__c = cmps.Id;
        ld.Program__c = prgm.Id;
        ld.Catalog__c = ctlg.Id;
        ld.recordTypeId = Schema.sObjectType.Lead.getRecordTypeInfosByName().get('ULA - Traditional Prospective Student').getRecordTypeId();
        insert ld;
        System.assertEquals(ld.Catalog__c, ctlg.Id);*/
        Test.stopTest();
    }
}